package com.example.rotateimageview

import android.content.Context
import android.util.AttributeSet
import android.view.View
import androidx.coordinatorlayout.widget.CoordinatorLayout
import java.util.jar.Attributes

class ViewBehavior @JvmOverloads constructor(val context: Context, val attributes: AttributeSet) :
    CoordinatorLayout.Behavior<View>(context,attributes) {

        init {


        }


    /**
     * parent 根布局
     * child behavior被应用的view
     *
     */
    override fun layoutDependsOn(
        parent: CoordinatorLayout,
        child: View,
        dependency: View
    ): Boolean {

        return super.layoutDependsOn(parent, child, dependency)
    }


    override fun onMeasureChild(
        parent: CoordinatorLayout,
        child: View,
        parentWidthMeasureSpec: Int,
        widthUsed: Int,
        parentHeightMeasureSpec: Int,
        heightUsed: Int
    ): Boolean {
        return super.onMeasureChild(
            parent,
            child,
            parentWidthMeasureSpec,
            widthUsed,
            parentHeightMeasureSpec,
            heightUsed
        )
    }

}